<template>
  <div class="pdf-container">
    <iframe :src="pdfViewerUrl" width="100%" height="100%"></iframe>
  </div>
</template>

<script>
export default {
  props: {
    pdfUrl: {
      type: String,
      required: true
    }
  },
  computed: {
    pdfViewerUrl() {
      return `/pdfjs/viewer.html?file=${encodeURIComponent(this.pdfUrl)}`;
    }
  }
}
</script>

<style scoped>
.pdf-container {
  height: 100%;
  width: 100%;
}
</style>
